import request from "@/utils/request";

/**
 * 获取也卡列表
 * @export
 * @param {*} params 参数
 * @returns {*}
 */
export function getCardListAPI(params) {
  return request({
    url: "/parking/card/list",
    method: "get",
    params,
  });
}

/**
 * 添加月卡
 * @export
 * @param {*} data 参数
 * @returns {*}
 */
export function addMonthCardAPI(data) {
  return request({
    url: "/parking/card",
    method: "post",
    data,
  });
}

/**
 * 获取月卡详情
 * @export
 * @param {*} id 月卡id
 * @returns {*}
 */
export function getCardDetailAPI(id) {
  return request.get(`/parking/card/detail/${id}`);
}

/**
 * 编辑月卡
 *
 * @export
 * @param {*} data 参数
 * @returns {*}
 */
export function editCardAPI(data) {
  return request.put("/parking/card/edit", data);
}

/**
 *
 * 删除月卡
 * @param {*} id 月卡id
 * @returns {*}
 */
export function deleteCardAPI(id) {
  return request.delete(`/parking/card/${id}`);
}
